+2009-01-13 Tor Lillqvist <tml@iki.fi>
+
+ Bug 164002 - query scripts don't work uninstalled on windows
+
+ * gtk/gtkmain.c (_gtk_get_libdir): If the gtk DLL is in a ".libs"
+ folder, assume we are running uninstalled, and use the
+ configure-time GTK_LIBDIR.
+
2009-01-12 Matthias Clasen <mclasen@redhat.com>
* NEWS: Refer to tray icon spec, instead of a random email.
return TRUE;
}
-/* This here before inclusion of gtkprivate.h so that it sees the
- * original GTK_LOCALEDIR definition. Yeah, this is a bit sucky.
+/* These here before inclusion of gtkprivate.h so that the original
+ * GTK_LIBDIR and GTK_LOCALEDIR definitions are seen. Yeah, this is a
+ * bit sucky.
*/
+const gchar *
+_gtk_get_libdir (void)
+{
+ static char *gtk_libdir = NULL;
+ if (gtk_libdir == NULL)
+ {
+ gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
+ gchar *slash = strrchr (root, '\\');
+ if (g_ascii_strcasecmp (slash + 1, ".libs") == 0)
+ gtk_libdir = GTK_LIBDIR;
+ else
+ gtk_libdir = g_build_filename (root, "lib", NULL);
+ g_free (root);
+ }
+
+ return gtk_libdir;
+}
+
const gchar *
_gtk_get_localedir (void)
{
return gtk_datadir;
}
-const gchar *
-_gtk_get_libdir (void)
-{
- static char *gtk_libdir = NULL;
- if (gtk_libdir == NULL)
- {
- gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
- gtk_libdir = g_build_filename (root, "lib", NULL);
- g_free (root);
- }
-
- return gtk_libdir;
-}
-
const gchar *
_gtk_get_sysconfdir (void)
{